<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="/template/_mensuresTemplate.xhtml">
<ui:define name="content">	
	<p:panel header="Gerenciamento de Agências" style="text-align:left;" >

						<h:panelGrid  columns="2" >
							<h:graphicImage value="/resources/images/administrator.jpg" width="85" height="80" />	
							<p:commandButton value="Nova Agência" onclick="dlgCadAgencia.show()" />
							<h3>Administrador</h3>
						</h:panelGrid>
							
							 <p:dataTable id="tabelaAgencia" paginator="true" var="result" value="#{agenciaMBean.listResulAtual}"  widgetVar="resultTable" 
								  filteredValue="#{agenciaMBean.filteredResultAtual}" emptyMessage="Nenhuma informação cadastrada" >    
								        <f:facet name="header">  
								            <p:outputPanel>  
								                <h:outputText value="Procurar em todos os campos:" />  
								                <p:inputText id="globalFilter" onkeyup="resultTable.filter()"  style="width:100px" />  
								            </p:outputPanel>  
								        </f:facet> 
								       <p:column id="modelColumn"
								                headerText="Agência">  
								            <h:outputText value="#{result.agencia}" />  
								       </p:column>
								       <p:column headerText="Responsável"  filterMatchMode="exact">  
									           <h:outputText value="#{result.responsavel}" />  
									   </p:column>   
								       <p:column id="tituloColumn"
								                headerText="Tel.Comercial">  
								            <h:outputText value="#{result.foneCom}" />  
								       </p:column> 				  
									   <p:column headerText="Visualizar"  filterMatchMode="endsWith">  
									        <p:growl id="growl" sticky="true" showDetail="true"/>  
  											<p:commandLink id="abrirDialogDetalhe" value="Dashboard" onclick="dlgVisualizaDetalhePublic.show()"/>    
									   </p:column>
									    <p:column headerText="Ações"  filterMatchMode="exact">  
									           <p:commandLink value="Alterar" /> /
									           <p:commandLink value="Excluir"  onclick="confirmation.show()" />   
 
									   </p:column>
									   
							</p:dataTable> 
					
				</p:panel>	
	
	<!-- Modal de Cadastro de Agencias -->
		<ui:include src="/modal/modalCadAgencia.xhtml" />				
				
</ui:define>
</ui:composition>
</html>